home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5124 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: hermes.oc.com!usenet
  2. From: Larry Weiss <lfw@oc.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Borland C - compiler not finding window.h file.
  5. Date: Fri, 09 Feb 1996 10:56:44 -0600
  6. Organization: OpenConnect Systems, Dallas, TX, USA
  7. Message-ID: <311B7CCC.6BFD@oc.com>
  8. References: <4f85f9$4i8@guitar.sound.net> <311AAC3C.3DB@ix.netcom.com>
  9. NNTP-Posting-Host: ocs2228.oc.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14. CC: lfw@oc.com
  15.  
  16. Norman Bullen wrote:
  17.   
  18. > Do you have <...> or "..." surrounding the include file name? <...> will
  19. > find the file in any of the directories specified in the IDE for include
  20. > files; "..." will only find the file in the current directory or a fully
  21. > qualified directory.
  22.  
  23. It's up to the specific implementation to define the exact rules that
  24. define any definition of a path to search, but the usual definition
  25. for the "..." syntax is more complex than you describe.    The usual
  26. rule is that if possible, the included file is the one that is in the
  27. same directory as the file in which the #include directive is found.
  28. Only if that rule is not possible (the file does not exist in that
  29. directory) does the file in the current directory get included.    
  30.  
  31.    This has grave consequences for nested include files, and sometimes
  32. you get different versions of the same include files used in different
  33. modules of a program.   Because of this, I never use the "..." form
  34. and always use the <...> form.   The <...> form usually is associated
  35. with a rule that defines and uses a user defineable and predictable search
  36. path (that can include the current directory, if desired, as the first
  37. directory to search).  
  38.  
  39.    Again, these are strictly implementation (not language) issues.
  40.